//
//  BaseViewController.m
//  ProjectDemo
//
//  Created by IOS3 on 2018/10/24.
//  Copyright © 2018 IOS3. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = UIColor.whiteColor;
    self.loadingCount = 0;
    self.showDefaultHUD = YES;
//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeAppTheme) name:KEY_changeThemeNotify object:nil];
}


- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

}
- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    
}
- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    
}
- (void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
    
}

- (void)setLoadingCount:(NSInteger)loadingCount {
    if (self.isShowDefaultHUD) {
        if (_loadingCount == 0 && loadingCount > 0) {
//            [MBProgressHUD showLoadToView:self.view];
        }
        else if (_loadingCount > 0 && loadingCount == 0) {
//            [MBProgressHUD hideHUDForView:self.view];
        }
    }
    _loadingCount = loadingCount;
}

/// 用于继承
- (void)changeAppTheme {
}


- (void)dealloc {
//    [[NSNotificationCenter defaultCenter] removeObserver:self name:KEY_changeThemeNotify object:nil];
#ifdef DEBUG
    NSLog(@"##########  %@ dealloc", NSStringFromClass(self.class));
#endif
    
}

@end
